package com.bayern.muchen.more_test.rabbitmqtest;

import org.springframework.amqp.core.AmqpAdmin;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author QIUYANG
 * @title: RabbitMQTest
 * @description: TODO
 * @date 2021/12/208:55
 */

@Service
public class RabbitMQTest {

    @Autowired
    AmqpAdmin amqpAdmin;

    @Autowired
    RabbitTemplate rabbitTemplate;


//    @RabbitListener( queues = {"hello-java-queue"})
    public void recieveMessage(Message message){
        System.out.println("接收消息"+message);
    }


}
